<?php
/**
 * Created by PhpStorm.
 * User: hollis
 * Date: 2020/9/1
 * Time: 10:59
 */

function import(){
    $file = fopen(__DIR__."/data_list.csv",'r');
    $i = 0;
    $list = [];
    while ($data = fgetcsv($file)) { //每次读取CSV里面的一行内容
        $list[] = [
            mb_convert_encoding($data[0], 'UTF-8', 'gbk'),
            mb_convert_encoding($data[1], 'UTF-8', 'gbk'),
        ];
        $i++;
    }
    fclose($file);
    return $list;
}